import findPageRouters from './findPageRouters.js';
import myPageRouters from './myPageRoutres.js';
import courseRouters from './courseRouters.js';
import certifiedCoursesRouters from './certifiedCoursesRouters.js';
import circleRouters from './circleRouters.js';
import adminRouters from './adminRouters.js';

export default [
    {
        path: '/',
        redirect: '/loginIndex'//重定向为home主页
    },
    {
        path: '/loginIndex',
        name: 'loginPage',
        component: () => import('@/components/login/Login')
    },
    {
        path: '/forgetPwd',
        name: 'forgetPwd',
        component: () => import('@/components/forgetPwd/forget_pwd')
    },
    {
        path: '/binging', // 微信绑定
        name: 'binging',
        component: () => import('@/components/login/binging')
    },
    {
        path: '/wxLogin', // 微信登录
        component: () => import('@/components/login/wx_login.vue')
    },
    {
        path: '/home',
        name: 'home',
        component: () => import('@/components/home/Home'),
        children: [
            {
                path: '',
                name: 'homeIndex',
                component: () => import('@/components/home/index')
            }
        ]
    },
    { // 这块路由现在只有从学习足迹(/learningHistory/:encId',学习记录保留该功能)里面有入口,所以暂不删除
        path: '/LearnIndex',
        component: () => import('@/components/learn/LearnIndex'),
        children: [
            {
                path: 'myCourses/:encId',
                component: () => import('@/components/learn/MyCourses')
            },
            {
                path: 'electiveCenter',
                component: () => import('@/components/learn/ElectiveCenter')
            },
            {
                path: 'recommendCourse',
                component: () => import('@/components/learn/RecommendCourse')
            }
        ]
    },
    { // 改造后得学习模块
        path: '/Learn',
        component: () => import('@/components/learn/newLearn/index'),
        children: [
            {
                path: 'myCourses/:encId',
                component: () => import('@/components/learn/newLearn/MyCourses')
            },
            { // 认证课程
                path: 'certifiedCourses/:encId',
                component: () => import('@/components/learn/newLearn/CertifiedCourses')
            },
            {
                path: 'knowledge',
                component: () => import('@/components/learn/newLearn/Knowledge')
            },
            {
                path: 'examination',
                component: () => import('@/components/learn/newLearn/Examination')
            }
        ]
    },
    { // 学习--课程目录子页面
        path: '/course-list',
        component: () => import('@/components/learn/newLearn/courseCatalogDetail')
    },
    { // 学习--知识目录子页面
        path: '/konwledge-list',
        component: () => import('@/components/learn/newLearn/konwledgeCatalogDetail')
    },
    { // 学习--推荐课程
        path: '/recommendCourse',
        component: () => import('@/components/learn/newLearn/RecommendCourse')
    },
    {
        path: '/find/:encId',
        component: () => import('@/components/find/Find')
    },
    {
        path: '/personal/:encId',
        component: () => import('@/components/personal/Personal')
    },
    {//新站内信
        path: '/messageNotification',
        component: () => import('@/components/message/NewMessage')
    },
    {//新站内信详情
        path: '/messageDetail/:msgId/:isRead',
        component: () => import('@/components/message/NewMessageDetail')
    },
    {//新建站内信
        path: '/publish',
        component: () => import('@/components/message/Publish')
    },
    {//搜索
        path: '/search',
        component: () => import('@/components/search/FreshSearch')
    },
    {//待办事项
        path: '/todolist',
        component: () => import('@/components/home/TodoList')
    },
    { // PK入口
        path: '/pk-index',
        name: 'pkEnter',
        component: () => import('@/components/pk/index')
    },
    {//PK看板入口
        path: '/pk/borad',
        name: 'pkBorad',
        component: () => import('../components/pk/pk-borad')
    },
    { // 二维码（主页面）
        path: '/qrcode/index',
        component: () => import('@/components/qrcode/index')
    },
    { // 二维码（事件处理）
        path: '/qrcode/event-handling',
        component: () => import('@/components/qrcode/event-handling')
    },
    { // 二维码（扫码预览证书）
        path: '/qrcode/preview-certificate',
        component: () => import('@/components/qrcode/preview-certificate')
    },
    { // 扫一扫
        path: '/barcodeScan',
        component: () => import('@/components/qrcode/BarcodeScan')
    },
    //发现页面路由(all)
    ...findPageRouters,
    ...myPageRouters, //我的页面路由
    ...courseRouters, //学习页面路由
    ...certifiedCoursesRouters, //学习页面路由
    ...circleRouters, //工作圈路由
    ...adminRouters //配置管理员路由
];
